<template>
	<view class="bg">
		<image class="bg_img" src="../static/picture_baozhang_beijng.png" mode=""></image>
		<view class="fl_img">
			<image class="img" src="../static/ziti_baozhang_youfuli.png" mode=""></image>
		</view>
		<view class="main">
			<view class="main_box">
				<view class="main_box_num">
					<text>已有</text>
					<view class="main_box_txt">
						<view class="main_box_num_small" v-for="item in num_data" :key="item">
							{{item}}
						</view>
					</view>
					<text>免费领取</text>

				</view>

				<view class="main_box_txt_input">
					<view class="main_box_txt_box">
						<input type="text" value="" class="main_box_txt_input_name t1" placeholder="*您的姓名" />
					</view>
					<view class="main_box_txt_box">
						<input type="text" value="" class="main_box_txt_input_phone t1" placeholder="*手机号" />
					</view>
					<view class="main_box_txt_box">
						<input type="text" value="" class="main_box_txt_input_is t1" placeholder="*验证码" /><text
							class="box_t"  @tap="getYan" v-if="isyan">获取验证码</text>
							<text
							class="box_t" v-else>{{s}}后重试</text>
					</view>
					<view class="main_box_txt_box">
						<input type="text" value="" class="main_box_txt_input_ID t1" placeholder="*身份证号" />
					</view>
					<button type="default" class="main_box_txt_btn" v-if="isChecked" @tap="btnTo">免费领取</button>
					<button type="default"  v-else class="main_box_txt_btn"  style="background-color:#B6B6B6;" >免费领取</button>
					<view class="main_box_txt_nav">
						<checkbox-group name="" @change="changChecked">
							<label>
								<checkbox  :value="true" :checked="isChecked" style="transform:scale(0.4)" /><text> 我已确认《健康告知》《小雨点保险服务协议》《个人信息授
									权及保护声明》</text>
							</label>
						</checkbox-group>
					</view>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				num_data: "785162",
				isChecked:false,
				s: 60,
				isyan: true,
				
			}
		},
		computed: {
			JJs() {
				setInterval(() => {
					this.s--;
					if (this.s == 0) this.isyan = true
				}, 1000)
		
			}
		
			
		},
		methods: {
			btnTo(){
				console.log("已授权")
			},
			changChecked(e){
				
				if(e.detail.value[0])this.isChecked = e.detail.value[0]
				else this.isChecked = false
			},
			getYan() {
				console.log(111)
				this.isyan = false;
				this.s = 60
			}
		}
	}
</script>

<style scoped lang="scss">
	.bg {
		border-top: 1px solid transparent;
		
		.bg_img {
			height: 1418rpx;
			position: absolute;
			z-index: -1;
			width: 750rpx;
		}

		.fl_img {
			width: 542rpx;
			height: 308rpx;
			margin: 0 auto;
			margin-top: 60rpx;

			.img {
				width: 542rpx;
				height: 308rpx;
				margin: 0 auto;
				margin-top: 60rpx;
			}
		}

		.main {
			box-sizing: border-box;

			.main_box {
				width: 670rpx;
				height: 842rpx;
				background-color: #ffffff;
				border-radius: 16rpx;
				margin: 0 auto;
				margin-top: 106rpx;
				box-sizing: border-box;
				padding: 40rpx;

				.main_box_num {
					display: flex;
					margin: 0 auto;
					font-size: 30rpx;
					font-weight: normal;
					font-stretch: normal;
					line-height: 60rpx;
					letter-spacing: 0rpx;
					color: #161616;

					.main_box_txt {
						display: flex;
						margin: 0 30rpx;

						.main_box_num_small {
							text-align: center;
							width: 48rpx;
							height: 58rpx;
							background-color: #f8f7f7;
							font-size: 40rpx;
							font-weight: normal;
							font-stretch: normal;
							line-height: 58rpx;
							letter-spacing: 0rpx;
							color: #ff3a3a;
							margin-left: 10rpx;

						}
					}


				}

				.main_box_txt_input {
					margin-top: 68rpx;

					.main_box_txt_box {
						width: 576rpx;
						height: 72rpx;
						border-bottom: 1px solid #B6B6B6;
						display: flex;
						margin-top: 40rpx;
						justify-content: space-between;

						.box_t {
							font-weight: normal;
							font-stretch: normal;
							line-height: 44rpx;
							letter-spacing: 0rpx;
							color: #323232;
							opacity: 0.7;
							margin-right: 60rpx;
						}

						.t1 {
							font-size: 24rpx;
							font-weight: normal;
							font-stretch: normal;
							line-height: 44rpx;
							letter-spacing: 0rpx;
							color: #323232;
							opacity: 0.7;
						}
					}

					.main_box_txt_btn {
						width: 400rpx;
						height: 84rpx;
						background-color: #007aff;
						border-radius: 40rpx;
						margin-top: 40rpx;
						font-size: 32rpx;
						font-weight: normal;
						font-stretch: normal;
						line-height: 84rpx;
						letter-spacing: 0rpx;
						color: #ffffff;
					}

					.main_box_txt_nav {
						font-size: 20rpx;
						font-weight: normal;
						font-stretch: normal;
						line-height: 44rpx;
						letter-spacing: 0rpx;
						color: #b7b7b7;
						opacity: 0.7;
						font-size: 20rpx;
						font-weight: normal;
						letter-spacing: 0rpx;
						color: #323232;
						opacity: 0.7
					}
				}
			}
		}
	}
</style>
